/**
* @file task.h
* @author Jan Sliacky
* 
* Header file for tasks.c
*
* April 2010
*
* Copyright (c) 2009 by Jan Sliacky
* All rights reserved.
*/

#ifndef TASKS_H
#define TASKS_H

enum TaskStatuses {
  TASK_UNSOLVED = 0,
  TASK_SOLVED,
  TASK_ASSIGN
};

typedef struct Task	{
	int ID;
	float value;
	enum TaskStatuses status;
} TASK;

int initTasks(void);
void destroyTasks(void);
void initTasksVariables();
void resetTasksVariables();
void destroyTasksVariables(void);
int takeFromTaskToDo(TASK* t);
void addToTaskToDo(TASK* t);
int takeFromSolvedTasks(TASK* t);
void addToSolvedTasks(TASK* t);
_Bool areAllSolved(void);
_Bool isUnassignWork(void);
_Bool isUnassignTask(void);
void clearAssignedTasks(void);
void clearTasksStatuses(void);
int getTasksCount(void);
int getToDoTaskCount(void);
int getSolvedTasksCount(void);
int getRecentlySolvedTasksCount(void);
int getNextSolvedTask(TASK *t, int from);
int getUnassignTasks(void);
int getTaskStatus(int taskID);
int getFirstAssignTask(void);
void addTask(TASK* t);
void markTaskStatus(TASK* t, enum TaskStatuses ts);

#endif
